package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhAgentOrderSellMapper;
import com.ruoyi.zsyh.domain.ZsyhAgentOrderSell;
import com.ruoyi.zsyh.service.IZsyhAgentOrderSellService;
import com.ruoyi.common.core.text.Convert;

/**
 * 大区会长预订单详细Service业务层处理
 * 
 * @author yuexl
 * @date 2021-12-15
 */
@Service
public class ZsyhAgentOrderSellServiceImpl implements IZsyhAgentOrderSellService 
{
    @Autowired
    private ZsyhAgentOrderSellMapper zsyhAgentOrderSellMapper;

    /**
     * 查询大区会长预订单详细
     * 
     * @param id 大区会长预订单详细ID
     * @return 大区会长预订单详细
     */
    @Override
    public ZsyhAgentOrderSell selectZsyhAgentOrderSellById(String id)
    {
        return zsyhAgentOrderSellMapper.selectZsyhAgentOrderSellById(id);
    }

    /**
     * 查询大区会长预订单详细列表
     * 
     * @param zsyhAgentOrderSell 大区会长预订单详细
     * @return 大区会长预订单详细
     */
    @Override
    public List<ZsyhAgentOrderSell> selectZsyhAgentOrderSellList(ZsyhAgentOrderSell zsyhAgentOrderSell)
    {
        return zsyhAgentOrderSellMapper.selectZsyhAgentOrderSellList(zsyhAgentOrderSell);
    }

    /**
     * 新增大区会长预订单详细
     * 
     * @param zsyhAgentOrderSell 大区会长预订单详细
     * @return 结果
     */
    @Override
    public int insertZsyhAgentOrderSell(ZsyhAgentOrderSell zsyhAgentOrderSell)
    {
        zsyhAgentOrderSell.setCreateTime(DateUtils.getNowDate());
        return zsyhAgentOrderSellMapper.insertZsyhAgentOrderSell(zsyhAgentOrderSell);
    }

    /**
     * 修改大区会长预订单详细
     * 
     * @param zsyhAgentOrderSell 大区会长预订单详细
     * @return 结果
     */
    @Override
    public int updateZsyhAgentOrderSell(ZsyhAgentOrderSell zsyhAgentOrderSell)
    {
        zsyhAgentOrderSell.setUpdateTime(DateUtils.getNowDate());
        return zsyhAgentOrderSellMapper.updateZsyhAgentOrderSell(zsyhAgentOrderSell);
    }

    /**
     * 删除大区会长预订单详细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentOrderSellByIds(String ids)
    {
        return zsyhAgentOrderSellMapper.deleteZsyhAgentOrderSellByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除大区会长预订单详细信息
     * 
     * @param id 大区会长预订单详细ID
     * @return 结果
     */
    @Override
    public int deleteZsyhAgentOrderSellById(String id)
    {
        return zsyhAgentOrderSellMapper.deleteZsyhAgentOrderSellById(id);
    }
}
